<div>
    <x-mini-header>
        <x-slot name="url"></x-slot>
        <x-slot name="title">政策条款</x-slot>

        <div class="flex text-center">
            @foreach($this->posts as $post)
                <a wire:navigate wire:key="{{ $post->getKey() }}" href="{{ route('agreement', ['post_id' => $post->getKey()]) }}"
                    @class(['w-1/2 p-2 hover:text-red-600', 'text-red-500 border-b-2 border-red-500' => $this->current->getKey() === $post->getKey()])>{{ $post->title }}</a>
            @endforeach
        </div>
    </x-mini-header>

    <div class="prose prose-sm p-4 text-black">
        {{ $this->current->content }}
    </div>
</div>
